<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>T3D: T3D::Vector3 Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">T3D
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>T3D</b></li><li class="navelem"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="class_t3_d_1_1_vector3-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">T3D::Vector3 Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8c12d26886698cbe92ac0ea66cb6123c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8c12d26886698cbe92ac0ea66cb6123c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Vector3</b> (const float x, const float y, const float z)</td></tr>
<tr class="separator:a8c12d26886698cbe92ac0ea66cb6123c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66a041496e5bf3cd9a2b7e3a2ec81aad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a66a041496e5bf3cd9a2b7e3a2ec81aad"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Vector3</b> (const float arr[3])</td></tr>
<tr class="separator:a66a041496e5bf3cd9a2b7e3a2ec81aad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61d3752ed83ccbbdb305ae3e07260ccf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a61d3752ed83ccbbdb305ae3e07260ccf"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Vector3</b> (float *const arr)</td></tr>
<tr class="separator:a61d3752ed83ccbbdb305ae3e07260ccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fbe97c91a8fc9b655ad0b9f3604427e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#a4fbe97c91a8fc9b655ad0b9f3604427e">swap</a> (<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;other)</td></tr>
<tr class="separator:a4fbe97c91a8fc9b655ad0b9f3604427e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ac57aae6f713d07011394a2bb5f2706"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ac57aae6f713d07011394a2bb5f2706"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>operator[]</b> (const int i) const </td></tr>
<tr class="separator:a9ac57aae6f713d07011394a2bb5f2706"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bc02ad48a9639a3c80f87a5a17b5a1f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3bc02ad48a9639a3c80f87a5a17b5a1f"></a>
float &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator[]</b> (const int i)</td></tr>
<tr class="separator:a3bc02ad48a9639a3c80f87a5a17b5a1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5621caf8a115d205c424e2370b1e57f4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5621caf8a115d205c424e2370b1e57f4"></a>
float *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#a5621caf8a115d205c424e2370b1e57f4">ptr</a> ()</td></tr>
<tr class="memdesc:a5621caf8a115d205c424e2370b1e57f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer accessor for direct copying. <br/></td></tr>
<tr class="separator:a5621caf8a115d205c424e2370b1e57f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a198123d63032b2a33c4a3dc6e7e044e2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#a198123d63032b2a33c4a3dc6e7e044e2">operator=</a> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;other)</td></tr>
<tr class="memdesc:a198123d63032b2a33c4a3dc6e7e044e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer accessor for direct copying.  <a href="#a198123d63032b2a33c4a3dc6e7e044e2">More...</a><br/></td></tr>
<tr class="separator:a198123d63032b2a33c4a3dc6e7e044e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a428967e1fec0b25e273f4ff1263b92d7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a428967e1fec0b25e273f4ff1263b92d7"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;other) const </td></tr>
<tr class="separator:a428967e1fec0b25e273f4ff1263b92d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadedc09f8872f550fcd75343607b55b5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aadedc09f8872f550fcd75343607b55b5"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;other) const </td></tr>
<tr class="separator:aadedc09f8872f550fcd75343607b55b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abaa56f502197608b0f482b21754be322"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abaa56f502197608b0f482b21754be322"></a>
<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator+</b> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;other) const </td></tr>
<tr class="separator:abaa56f502197608b0f482b21754be322"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a713404d8450f850a6c5e4d2042a4c3e8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a713404d8450f850a6c5e4d2042a4c3e8"></a>
<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator-</b> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;other) const </td></tr>
<tr class="separator:a713404d8450f850a6c5e4d2042a4c3e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88c0af3ba12a36c0a456dfc0a2fe595f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a88c0af3ba12a36c0a456dfc0a2fe595f"></a>
<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator*</b> (const float s) const </td></tr>
<tr class="separator:a88c0af3ba12a36c0a456dfc0a2fe595f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1092493c231f412ec6f02476f23cf70"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa1092493c231f412ec6f02476f23cf70"></a>
<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator/</b> (const float s) const </td></tr>
<tr class="separator:aa1092493c231f412ec6f02476f23cf70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a200f6581ac40023795fc6850ca260723"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a200f6581ac40023795fc6850ca260723"></a>
const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator+</b> () const </td></tr>
<tr class="separator:a200f6581ac40023795fc6850ca260723"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a46eaded215edd9004ae97abadd9b82"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5a46eaded215edd9004ae97abadd9b82"></a>
<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator-</b> () const </td></tr>
<tr class="separator:a5a46eaded215edd9004ae97abadd9b82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40000b8f9c225b4fea42a8653b6c0f00"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a40000b8f9c225b4fea42a8653b6c0f00"></a>
<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator+=</b> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;other)</td></tr>
<tr class="separator:a40000b8f9c225b4fea42a8653b6c0f00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c616f60db044999587d4a3205fd5502"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c616f60db044999587d4a3205fd5502"></a>
<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator-=</b> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;other)</td></tr>
<tr class="separator:a5c616f60db044999587d4a3205fd5502"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4569d963dfc4d08a2ef60a2ee0a37ef5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4569d963dfc4d08a2ef60a2ee0a37ef5"></a>
<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator*=</b> (const float s)</td></tr>
<tr class="separator:a4569d963dfc4d08a2ef60a2ee0a37ef5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60d5e40660c88c3b569bbd833654d9e2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a60d5e40660c88c3b569bbd833654d9e2"></a>
<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator/=</b> (const float s)</td></tr>
<tr class="separator:a60d5e40660c88c3b569bbd833654d9e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65c1d2dc44afb8cf90e4762a3287f6c0"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#a65c1d2dc44afb8cf90e4762a3287f6c0">length</a> () const </td></tr>
<tr class="separator:a65c1d2dc44afb8cf90e4762a3287f6c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd91aebbd70888894baefb8b2695f621"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#acd91aebbd70888894baefb8b2695f621">squaredLength</a> () const </td></tr>
<tr class="separator:acd91aebbd70888894baefb8b2695f621"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a452a6bc7d41540004966cea379b47ac7"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#a452a6bc7d41540004966cea379b47ac7">distance</a> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;other) const </td></tr>
<tr class="separator:a452a6bc7d41540004966cea379b47ac7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab035928e8e3ddc55ad9218c734cb92c3"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#ab035928e8e3ddc55ad9218c734cb92c3">squaredDistance</a> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;other) const </td></tr>
<tr class="separator:ab035928e8e3ddc55ad9218c734cb92c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea3be73fc8042f2bd19f81672f70945b"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#aea3be73fc8042f2bd19f81672f70945b">dot</a> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;other) const </td></tr>
<tr class="separator:aea3be73fc8042f2bd19f81672f70945b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8df4e6ed9be84d7ba432a739dfaaed2f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#a8df4e6ed9be84d7ba432a739dfaaed2f">normalise</a> ()</td></tr>
<tr class="separator:a8df4e6ed9be84d7ba432a739dfaaed2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c6b47c937d245df6760f182b3f07372"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#a6c6b47c937d245df6760f182b3f07372">cross</a> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;other) const </td></tr>
<tr class="separator:a6c6b47c937d245df6760f182b3f07372"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae31951331ffa4d0bdb00f61cfd2ca84f"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#ae31951331ffa4d0bdb00f61cfd2ca84f">angleBetween</a> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;other)</td></tr>
<tr class="separator:ae31951331ffa4d0bdb00f61cfd2ca84f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9466d3b20483399676c0f040a83ee5fb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#a9466d3b20483399676c0f040a83ee5fb">normalised</a> (void) const </td></tr>
<tr class="separator:a9466d3b20483399676c0f040a83ee5fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3639eebd96e854b54015809f22b69770"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#a3639eebd96e854b54015809f22b69770">reflect</a> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;normal) const </td></tr>
<tr class="separator:a3639eebd96e854b54015809f22b69770"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a7ed8992953cb573f48248a4cca94d63a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7ed8992953cb573f48248a4cca94d63a"></a>
static <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><b>lerp</b> (<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> first, <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> second, float t)</td></tr>
<tr class="separator:a7ed8992953cb573f48248a4cca94d63a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:abf29ce95f1a0b5fae84762451ea73dc0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abf29ce95f1a0b5fae84762451ea73dc0"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>x</b></td></tr>
<tr class="separator:abf29ce95f1a0b5fae84762451ea73dc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9a6a9acabdfe7b97d4c06e9c5306dd5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad9a6a9acabdfe7b97d4c06e9c5306dd5"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>y</b></td></tr>
<tr class="separator:ad9a6a9acabdfe7b97d4c06e9c5306dd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1529443ca6497353a50f201f6ceff167"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1529443ca6497353a50f201f6ceff167"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>z</b></td></tr>
<tr class="separator:a1529443ca6497353a50f201f6ceff167"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a8dde5080f178f79ab4ef5e8690471c25"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8dde5080f178f79ab4ef5e8690471c25"></a>
<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator*</b> (const float s, const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;v)</td></tr>
<tr class="separator:a8dde5080f178f79ab4ef5e8690471c25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5b95c30185d2e9950e2122036564f41"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac5b95c30185d2e9950e2122036564f41"></a>
<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator/</b> (const float s, const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;v)</td></tr>
<tr class="separator:ac5b95c30185d2e9950e2122036564f41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a151b7be26d6dc535fd2583f74011084d"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_vector3.html#a151b7be26d6dc535fd2583f74011084d">operator&lt;&lt;</a> (std::ostream &amp;o, const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;v)</td></tr>
<tr class="separator:a151b7be26d6dc535fd2583f74011084d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ae31951331ffa4d0bdb00f61cfd2ca84f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float T3D::Vector3::angleBetween </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<pre class="fragment">Gets the angle between 2 vectors.
</pre> <dl class="section remark"><dt>Remarks</dt><dd>Vectors do not have to be unit-length but must represent directions. </dd></dl>

</div>
</div>
<a class="anchor" id="a6c6b47c937d245df6760f182b3f07372"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> T3D::Vector3::cross </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Calculates the cross-product of 2 vectors, i.e. the vector that lies perpendicular to them both. </p>
<dl class="section remark"><dt>Remarks</dt><dd>The cross-product is normally used to calculate the normal vector of a plane, by calculating the cross-product of 2 non-equivalent vectors which lie on the plane (e.g. 2 edges of a triangle). </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vec</td><td>Vector which, together with this one, will be used to calculate the cross-product. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A vector which is the result of the cross-product. This vector will <b>NOT</b> be normalised, to maximise efficiency<ul>
<li>call <a class="el" href="class_t3_d_1_1_vector3.html#a8df4e6ed9be84d7ba432a739dfaaed2f">Vector3::normalise</a> on the result if you wish this to be done. As for which side the resultant vector will be on, the returned vector will be on the side from which the arc from 'this' to rkVector is anticlockwise, e.g. UNIT_Y.crossProduct(UNIT_Z) = UNIT_X, whilst UNIT_Z.crossProduct(UNIT_Y) = -UNIT_X. This is because OGRE uses a right-handed coordinate system. </li>
</ul>
</dd></dl>
<dl class="section user"><dt></dt><dd>For a clearer explanation, look a the left and the bottom edges of your monitor's screen. Assume that the first vector is the left edge and the second vector is the bottom edge, both of them starting from the lower-left corner of the screen. The resulting vector is going to be perpendicular to both of them and will go <em>inside</em> the screen, towards the cathode tube (assuming you're using a CRT monitor, of course). </dd></dl>

</div>
</div>
<a class="anchor" id="a452a6bc7d41540004966cea379b47ac7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float T3D::Vector3::distance </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the distance to another vector. </p>
<dl class="section warning"><dt>Warning</dt><dd>This operation requires a square root and is expensive in terms of CPU operations. If you don't need to know the exact distance (e.g. for just comparing distances) use <a class="el" href="class_t3_d_1_1_vector3.html#ab035928e8e3ddc55ad9218c734cb92c3">squaredDistance()</a> instead. </dd></dl>

</div>
</div>
<a class="anchor" id="aea3be73fc8042f2bd19f81672f70945b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float T3D::Vector3::dot </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Calculates the dot (scalar) product of this vector with another. </p>
<dl class="section remark"><dt>Remarks</dt><dd>The dot product can be used to calculate the angle between 2 vectors. If both are unit vectors, the dot product is the cosine of the angle; otherwise the dot product must be divided by the product of the lengths of both vectors to get the cosine of the angle. This result can further be used to calculate the distance of a point from a plane. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vec</td><td>Vector with which to calculate the dot product (together with this one). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A float representing the dot product value. </dd></dl>

</div>
</div>
<a class="anchor" id="a65c1d2dc44afb8cf90e4762a3287f6c0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float T3D::Vector3::length </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the length (magnitude) of the vector. </p>
<dl class="section warning"><dt>Warning</dt><dd>This operation requires a square root and is expensive in terms of CPU operations. If you don't need to know the exact length (e.g. for just comparing lengths) use <a class="el" href="class_t3_d_1_1_vector3.html#acd91aebbd70888894baefb8b2695f621">squaredLength()</a> instead. </dd></dl>

</div>
</div>
<a class="anchor" id="a8df4e6ed9be84d7ba432a739dfaaed2f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void T3D::Vector3::normalise </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Normalises the vector. </p>
<dl class="section remark"><dt>Remarks</dt><dd>This method normalises the vector such that it's length / magnitude is 1. The result is called a unit vector. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>This function will not crash for zero-sized vectors, but there will be no changes made to their components. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>The previous length of the vector. </dd></dl>

</div>
</div>
<a class="anchor" id="a9466d3b20483399676c0f040a83ee5fb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> T3D::Vector3::normalised </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>As normalise, except that this vector is unaffected and the normalised vector is returned as a copy. </p>

</div>
</div>
<a class="anchor" id="a198123d63032b2a33c4a3dc6e7e044e2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&amp; T3D::Vector3::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Pointer accessor for direct copying. </p>
<p>Assigns the value of the other vector. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rkVector</td><td>The other vector </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3639eebd96e854b54015809f22b69770"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> T3D::Vector3::reflect </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>normal</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<pre class="fragment">Calculates a reflection vector to the plane with the given normal .
</pre> <dl class="section remark"><dt>Remarks</dt><dd>NB assumes 'this' is pointing AWAY FROM the plane, invert if it is not. </dd></dl>

</div>
</div>
<a class="anchor" id="ab035928e8e3ddc55ad9218c734cb92c3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float T3D::Vector3::squaredDistance </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the square of the distance to another vector. </p>
<dl class="section remark"><dt>Remarks</dt><dd>This method is for efficiency - calculating the actual distance to another vector requires a square root, which is expensive in terms of the operations required. This method returns the square of the distance to another vector, i.e. the same as the distance but before the square root is taken. Use this if you want to find the longest / shortest distance without incurring the square root. </dd></dl>

</div>
</div>
<a class="anchor" id="acd91aebbd70888894baefb8b2695f621"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float T3D::Vector3::squaredLength </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the square of the length(magnitude) of the vector. </p>
<dl class="section remark"><dt>Remarks</dt><dd>This method is for efficiency - calculating the actual length of a vector requires a square root, which is expensive in terms of the operations required. This method returns the square of the length of the vector, i.e. the same as the length but before the square root is taken. Use this if you want to find the longest / shortest vector without incurring the square root. </dd></dl>

</div>
</div>
<a class="anchor" id="a4fbe97c91a8fc9b655ad0b9f3604427e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void T3D::Vector3::swap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Exchange the contents of this vector with another. </p>

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a class="anchor" id="a151b7be26d6dc535fd2583f74011084d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream&amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>o</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>v</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Function for writing to a stream. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>M:/T3Dwin/T3DShaderVersion/T3D/T3D/<a class="el" href="_vector3_8h_source.html">Vector3.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Feb 27 2014 10:39:52 for T3D by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
